<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../print.css" type="text/css" media="print">
<meta content="Header,loaderlib.loader.Header,linkName,relation,requestHash,requestQueue,bytesLoaded,bytesTotal,emptyQueue,info,queueNum,appendRequest,deleteRequest,every,forEach,hasRequest" name="keywords">
<title>loaderlib.loader.Header</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'Header - API Documentation';
				var baseRef = '../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../all-classes.html')" href="../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../all-classes.html')" href="../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../index-list.html')" href="../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../index.html?loaderlib/loader/Header.html&amp;loaderlib/loader/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;Header</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class Header"); titleBar_setSubNav(false,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">loaderlib.loader</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class Header</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">Header <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implements</td><td><a href="../progress/IProgressReporter.html">IProgressReporter</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Subclasses</td><td><a href="../loader/RequestHeader.html">RequestHeader</a>, <a href="../loader/TagHeader.html">TagHeader</a></td>
</tr>
</table>
<p></p>
  <code>It</code> is a template class. 
  
  i hope it work fine. Header define a queue's header, which the queue named linkName.
  for example if a XXheader set the linkName="AA". it means the XXheader own a attribute AA that link to a request.
  and the request has the attribute AA that link the request as a queue. 
  As such structure, we can link the same request in difference queue very simple. just define the linkName and
  add special code for special header. 
  
  Header's forEach and every function is very importance. for special header, the two function can solve most job.
  
  <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bytesLoaded">bytesLoaded</a> : Number<div class="summaryTableDescription">[read-only]
   bytesLoaded getter get loaded bytes.</div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bytesTotal">bytesTotal</a> : Number<div class="summaryTableDescription">[read-only]
   bytesTotal getter get demand bytes
   
   this function should be overrided
   
   </div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#emptyQueue">emptyQueue</a> : Boolean<div class="summaryTableDescription">[read-only]
   this getter get whether the request queue is empty
   
   </div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#info">info</a> : XML<div class="summaryTableDescription">[read-only]
   info getter get loading information
   
   this function should be overrided
   
   </div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#queueNum">queueNum</a> : int<div class="summaryTableDescription">[read-only]
   this getter get the number on the queue
   
   </div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#requestHash">requestHash</a> : Dictionary<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#requestQueue">requestQueue</a> : <a href="../loader/Request.html">Request</a>
<div class="summaryTableDescription">
   The requestQueue is the link, that connect as a queue.</div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
</table>
</div>
<a name="protectedPropertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Properties</div>
<table id="summaryTableProtectedProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#linkName">linkName</a> : String = "null"<div class="summaryTableDescription">
   the linkName is the attribute name in the Request.</div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#relation">relation</a> : String = "null"<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#Header()">Header</a>()</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#appendRequest()">appendRequest</a>(request:<a href="Request.html">Request</a>):Boolean</div>
<div class="summaryTableDescription">
   appendRequest append the request on the queue
   
   </div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#deleteRequest()">deleteRequest</a>(request:<a href="Request.html">Request</a>):Boolean</div>
<div class="summaryTableDescription">
   deleteRequest delete the request on the queue
   
   </div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#every()">every</a>(callback:Function, startRequest:<a href="Request.html">Request</a> = null, thisObject:* = null):Boolean</div>
<div class="summaryTableDescription">
   <code>every</code> function travel thought the request queue for testting.</div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#forEach()">forEach</a>(callback:Function, startRequest:<a href="Request.html">Request</a> = null, thisObject:* = null):void</div>
<div class="summaryTableDescription">
   <code>forEach</code> travel thought the request queue for setting.</div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#hasRequest()">hasRequest</a>(request:<a href="Request.html">Request</a>):<a href="../loader/Request.html">Request</a>
</div>
<div class="summaryTableDescription">
   hasRequest function search the request queue 
      </div>
</td><td class="summaryTableOwnerCol">Header</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="bytesLoaded"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">bytesLoaded</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>bytesLoaded:Number</code>&nbsp;&nbsp;[read-only]<p>
   bytesLoaded getter get loaded bytes.
   
   this function should be overrided.
   
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get bytesLoaded():Number</code>
<br>
</div>
<a name="bytesTotal"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">bytesTotal</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>bytesTotal:Number</code>&nbsp;&nbsp;[read-only]<p>
   bytesTotal getter get demand bytes
   
   this function should be overrided
   
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get bytesTotal():Number</code>
<br>
</div>
<a name="emptyQueue"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">emptyQueue</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>emptyQueue:Boolean</code>&nbsp;&nbsp;[read-only]<p>
   this getter get whether the request queue is empty
   
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get emptyQueue():Boolean</code>
<br>
</div>
<a name="info"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">info</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>info:XML</code>&nbsp;&nbsp;[read-only]<p>
   info getter get loading information
   
   this function should be overrided
   
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get info():XML</code>
<br>
</div>
<a name="linkName"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">linkName</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected var linkName:String = "null"</code><p>
   the linkName is the attribute name in the Request.
   </p><p>
   for most suitable usage. the Request should have this attribute.
   but if it haven't, the code can work, becouse the Request is dynamic class type.
   </p>
   
   <p>The default value is <code>null</code>.</p>
</div>
<a name="queueNum"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">queueNum</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>queueNum:int</code>&nbsp;&nbsp;[read-only]<p>
   this getter get the number on the queue
   
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get queueNum():int</code>
<br>
</div>
<a name="relation"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">relation</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>protected var relation:String = "null"</code>
</div>
<a name="requestHash"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">requestHash</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var requestHash:Dictionary</code>
</div>
<a name="requestQueue"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">requestQueue</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var requestQueue:<a href="../loader/Request.html">Request</a></code><p>
   The requestQueue is the link, that connect as a queue.
   
   </p><p>The requestLink should has a Request append it. if there are no Request, it means it just cached.
   So if need free the space, the null requestLink is choosen.</p>
   
   <p>The default value is <code>null</code>.</p>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="Header()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">Header</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function Header()</code>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="appendRequest()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">appendRequest</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>public function appendRequest(request:<a href="Request.html">Request</a>):Boolean</code><p>
   appendRequest append the request on the queue
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">request</span>:<a href="Request.html">Request</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; ture: if add it successful. false: if the queue has the request yet. 
   
   </td>
</tr>
</table>
</div>
<a name="deleteRequest()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">deleteRequest</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function deleteRequest(request:<a href="Request.html">Request</a>):Boolean</code><p>
   deleteRequest delete the request on the queue
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">request</span>:<a href="Request.html">Request</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; A value of <code>ture</code> means it delete the request successful;
   <code>false</code> means the queue hasn't the request, so it did nothing.
   
   </td>
</tr>
</table>
</div>
<a name="every()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">every</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function every(callback:Function, startRequest:<a href="Request.html">Request</a> = null, thisObject:* = null):Boolean</code><p>
   <code>every</code> function travel thought the request queue for testting.
   
   <span></p><p>it start on the startRequest, travel the queue and call the callback function in each queue element for testting
   </p>
   <p><strong>Notice: </strong>the callback function has such proto <strong>callback(request:Request):Boolean</strong>.</p>
   </span>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">callback</span>:Function</code> &mdash; the callback function 
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">startRequest</span>:<a href="Request.html">Request</a></code> (default = <code>null</code>)<code></code> &mdash; the travel start request, default is null, means the travel start from begining. 
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">thisObject</span>:*</code> (default = <code>null</code>)<code></code> &mdash; the callback function's parameter "this object"
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Boolean</code> &mdash; A value of <code>true</code> means no element apply the callback return false. 
   <code>false</code> means any element apply the callback return true.
   
   </td>
</tr>
</table>
</div>
<a name="forEach()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">forEach</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function forEach(callback:Function, startRequest:<a href="Request.html">Request</a> = null, thisObject:* = null):void</code><p>
   <code>forEach</code> travel thought the request queue for setting.
   
   <span></p><p>it start on the startRequest, travel the queue and call the callback function in each queue element for setting</p>
   
   <p><strong>Notice:</strong> the callback function has such proto <strong>callback(request:Request):Boolean</strong></p>
   </span>
   
   <span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">callback</span>:Function</code> &mdash; the set function
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">startRequest</span>:<a href="Request.html">Request</a></code> (default = <code>null</code>)<code></code> &mdash; the travel start request, default is null, means the travel start from  the begining.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">thisObject</span>:*</code> (default = <code>null</code>)<code></code> &mdash; the callback function "this object"
   </td>
</tr>
</table>
</div>
<a name="hasRequest()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">hasRequest</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function hasRequest(request:<a href="Request.html">Request</a>):<a href="../loader/Request.html">Request</a></code><p>
   hasRequest function search the request queue 
      </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">request</span>:<a href="Request.html">Request</a></code></td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code><a href="../loader/Request.html">Request</a></code> &mdash; 
                        a request: if find the request queue on the queue. null: if there are no such request on the queue.
   
   
                        
                     </td>
</tr>
</table>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
